/*
 * Copyright 2008-2009 Daniel Freitas
 * 
 * This file is part of Army Creator.
 * 
 * Army Creator is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * Army Creator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with Army Creator. If not, see
 * <http://www.gnu.org/licenses/>.
 */
package com.googlecode.armycreator.domain;

/**
 * Marker interface which flags an object as exportable. Exportable objects provide an immutable java bean with this
 * object's properties. The exporter bean does not have the means to change the object's contents so, for example, if
 * one of the properties is a collection or another Object, those are guaranteed to be immutable.
 * 
 * @author <a href="mailto:daniel.mfreitas@gmail.com">Daniel Freitas</a>
 * 
 * @param <K>
 *            The type of the bean used to hold this objects properties.
 */
public interface IExportable<K> {
    /**
     * Export this object as an immutable java bean. Implementing classes must guarantee that the original object's
     * properties or the objects they point to cannot be changed or updated. 
     * 
     * @return The properties of this object as a read only java bean.
     */
    public K exportAsBean();
}
